{% extends "../base.html"%} {% block header_title %}后台管理首页{% end %} {% block static_css %}
<link rel="stylesheet" href="{{ static_url('site/css/home.css') }}" />{% end%} {% block body %}
<div class="row">
    <div class="col-xs-1 col-sm-1 col-md-1 sidebar">
        <div class="user">
            <img src="{{static_url('images/ico-user-header.svg')}}">
            <h5>{{current_user['username']}}</h5>
            <a href="/auth/signout"><span class="glyphicon glyphicon-cog"title="用户中心"></span></a>&nbsp;
            <a href="/admin/signout">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
            </a>
        </div>
        <ul class="nav nav-sidebar">
            <li title="首页" class="active">
                <a href="/admin">
                    <i class="fa fa-home"></i>
                    <span class="hidden-sm hidden-xs text">首页</span>
                </a>
            </li>
            <li title="数据集">
                <a href="/admin/data">
                    <i class="fa fa-archive"></i>
                    <span class="hidden-sm hidden-xs text">数据集</span>
                </a>
            </li>
            <li title="申请单">
                <a href="/admin/apply">
                    <i class="fa fa-clipboard"></i>
                    <span class="hidden-sm hidden-xs text">申请单</span>
                </a>
            </li>
            <li title="应用表">
                <a href="/admin/app">
                    <i class="fa fa-cube"></i>
                    <span class="hidden-sm hidden-xs text">应用表</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main" class="col-xs-11 col-xs-offset-1 col-sm-11 col-sm-offset-1 col-md-11 col-md-offset-1 main">
        <section class="main-news">
            <div class="box">
                <div class="box-body clearfix">
                    <div class="news-hot">
                        <h4>管理员界面</h4>
                        <p>&nbsp;&nbsp;&nbsp;&nbsp;beta-0.1版
                        </p>
                    </div>
                    <div class="news-list">
                        <ul class="ui">
                            <li><a href="#" target="_blank"> </li>
                            <li><a href="#" target="_blank"> </li>
                            <li><a href="#" target="_blank"> </li>
                        </ul>
                    </div>
                    <!-- <div class="news-more"><a href="#" class="btn btn-info" target="_blank">论坛&nbsp;&nbsp;<span class="glyphicon glyphicon-arrow-right"></span></a></div> -->
                </div>
            </div>
        </section>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-7 pd-r">
                <div class="box">
                    <a href="/data/form" class="btn btn-primary">
                        <i class="fa fa-paperclip"></i> 新增数据
                    </a>
                </div>
                <div class="box">
                    <div class="box-title">
                        <h5>待发布的数据</h5>
                        <div class="box-tools">
                            <a href="/admin/data">
                                <i class="fa fa-navicon"></i>
                            </a>
                        </div>
                    </div>
                    <div class="box-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="header sortable">
                                        数据集名
                                    </th>
                                    <th class="header sortable">
                                        来源
                                    </th>
                                    <th class="header sortable">
                                        类型
                                    </th>
                                    <th class="header sortable">
                                        状态
                                    </th>
                                    <th class="header sortable">
                                        最后更新时间
                                    </th>
                                    <th class="header sortable">

                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for each in data_standby %}
                                <tr>
                                    <td>
                                        {{each['title']}}
                                    </td>
                                    <td>
                                        {{each['from']}}
                                    </td>
                                    <td>{{each['dtype']}}</td>
                                    {% set status = each['status']%}
                                    <td>{%if status==0%}未完成{%elif status ==10%}可发布{%end%}</td>
                                    <td>{{date_format(each['updatetime'])}}</td>
                                    <td>
                                        <a href="admin/data/{{each['_id']}}" class="btn btn-default btn-xs">查看</a>
                                    </td>
                                </tr>
                                {%end%}
                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-5 pd-l">
                <div class="box">
                    <div class="box-title">
                        <h5>待批准的申请</h5>
                        <div class="box-tools">
                            <a href="/admin/apply">
                                <i class="fa fa-navicon"></i>
                            </a>
                        </div>
                    </div>
                    <div class="box-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="header sortable">
                                        申请名
                                    </th>
                                    <th class="header sortable">
                                        涉及数据
                                    </th>
                                    <th class="header sortable">
                                        申请者
                                    </th>
                                    <th class="header sortable">

                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                {%for each in applys%}
                                <tr>
                                    <td>
                                        {{each['reseach']['title']}}
                                    </td>
                                    <td>
                                        {{each['dataset']['title']}}
                                    </td>
                                    <td>{{each['user']}}</td>
                                    <td>
                                        <a href="/admin/apply/{{each['_id']}}" class="btn btn-default btn-xs">查看</a>
                                    </td>
                                </tr>
                                {%end%}
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="box">
                    <div class="box-title">
                        <h5>运行中的应用</h5>
                        <div class="box-tools">
                            <a href="/admin/app">
                                <i class="fa fa-navicon"></i>
                            </a>
                        </div>
                    </div>
                    <div class="box-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="header sortable">
                                        申请名
                                    </th>
                                    <th class="header sortable">
                                        涉及数据
                                    </th>
                                    <th class="header sortable">
                                        申请者
                                    </th>
                                    <th class="header sortable">

                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        眼底图像xxxx
                                    </td>
                                    <td>
                                        眼底图像xxxx
                                    </td>
                                    <td>zzzzzz</td>
                                    <td>
                                        <a href="/admin/apply" class="btn btn-default btn-xs">查看</a>
                                    </td>
                                </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- <div class="box">
                    <div class="box-title">
                        <h5>待发布的数据</h5>
                        <div class="box-tools">
                            <a href="/admin/data">
                                更多
                                <i class="fa fa-angle-double-right"></i>
                            </a>
                        </div>
                    </div>
                    <div class="box-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="header sortable">
                                        数据集名
                                    </th>
                                    <th class="header sortable">
                                        来源
                                    </th>
                                    <th class="header sortable">
                                        类型
                                    </th>
                                    <th class="header sortable">
                                        更新时间
                                    </th>
                                    <th class="header sortable">

                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        眼底图像xxxx
                                    </td>
                                    <td>
                                        xxxx部门
                                    </td>
                                    <td>image</td>
                                    <td>2016-04-24 09:34:24</td>
                                    <td>
                                        <a href="data/detail" class="btn btn-default btn-xs">查看</a>
                                        <a href="data/detail" class="btn btn-default btn-xs">申请</a>
                                    </td>
                                </tr>

                            </tbody>
                        </table>
                        <a href="/auth/signout">更多</a>
                    </div>
                </div> -->
            </div>
        </div>
    </div>
</div>
{% end %}
